/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


package learn.round1B;

import java.io.IOException;
import static chanlib.Chan_Math.C;
import static chanlib.Chan_Math.nCr;
import static chanlib.Chan_IO.*;
/**
 * @author robit
 */
public class YourRankIsPure{
    /*
      All neccesary to be defined
      including:
      variable, inner class
    */
    static int[][] S;

    static long C(int n,int r){
        return C[n][r];
    }
    static void preReckon(int bound){
        S=new int[bound+1][bound+1];
        nCr(bound, 100003);
        for(int n=2;n<=bound;n++){
            S[n][1]=1;
            for(int k=2;k<n;k++){
               for(int j=1;j<k;j++){
                   //S[n][k]=(int)((S[n][k]+(S[k][j]*C[n-k-1][k-j-1])%100003)%100003);
                   //S[n][k]=arithmatic(S[n][k], S[k][j], C[n-k-1][k-j-1]);
                   S[n][k]=(int)((S[n][k]+(S[k][j]*C(n-k-1,k-j-1))%100003)%100003);
               }
            }
        }
        println("done");
    }

    /*
      calculate the answer
    */
    private static int reckon() {
        int n=Int();
        int ans=0;
        for(int k=1;k<n;k++)ans+=S[n][k];
        return ans%100003;
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        /*
           Pre-computing for all cases
        */        

        preReckon(511);
        while((char)read()!='P');

        /*
          Input-output
        */
        boolean test=false;
        boolean small=false;
        String prob="C";
        String filename;
        if(test) filename="test";
        else{
            if(small) filename=prob+"-small-practice";
            else filename=prob+"-large-practice";
        }
        try {
            /*
               Init IO,plus determination of input line number
             */
            int lineNums = initFileIO(filename);
            for (int i = 1; i <= lineNums; i++) {     
                writeln("Case #" + i + ": "+reckon(), OUTFILE);
            }
        } finally {
            endIO();
        }
    }

}
